package com.tyk.bookstore.front.cart.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

@Schema(name = "ShoppingCart", description = "购物车")
@TableName("shopping_cart")
@Data
public class CartDo implements Serializable {
    @Serial
    private static final long serialVersionUID = 1;

    @Schema(description = "会员ID")
    @TableField(value = "member_id")
    private Long memberId;

    @Schema(description = "书籍ID")
    @TableField("book_id")
    private Long bookId;

    @Schema(description = "购买数量")
    @TableField("num")
    private Integer num;

    @Schema(description = "选中[0否，1是(默认)]")
    @TableField("is_checked")
    private Boolean checked;

    @Schema(description = "创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    @TableField("update_time")
    private LocalDateTime updateTime;
}
